using System;
using System.Collections.Generic;
using System.Text;
using GameFramework;
using GameEngine;

namespace Projet_X0
{
    class CharacterForm : Form
    {
        public CharacterForm(Entity owner, int characterID) 
            : base(owner, new CharacterMesh(characterID))
        {
        }

        public override BoundingBox getBoundingBox()
        {
            Vector2D position = ((Character)GetOwner()).GetPosition().GetPos();

            return new BoundingBox(
                new Vector2D(
                    position.GetX() - ((CharacterMesh)GetMesh()).GetHeight() / 2 + 5, 
                    position.GetY() - ((CharacterMesh)GetMesh()).GetWidth() / 2 + 5), 
                new Vector2D(
                    position.GetX() + ((CharacterMesh)GetMesh()).GetHeight() / 2 - 5, 
                    position.GetY() + ((CharacterMesh)GetMesh()).GetWidth() / 2 - 5));
        }
    }
}
